#!/usr/bin/python

import serial
import serial.tools.list_ports

def list_all_ports():
    ports = list(serial.tools.list_ports.comports())
    COMS = []
    for item in ports:
        COMS.append(item[0])
    return COMS
    
if __name__ == '__main__':
    COMS = list_all_ports()
    print COMS